<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>aaa</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        li {
            list-style: none;
        }
        
        .menu-A>li {
            float: left;
            border: 1px solid yellow;
            text-align: center;
            width: 80px;
        }
        
        .sub-menu>li {
            height: 0px;
            overflow: hidden;
            background-color: red;
            transition: height 1s;
            color: #fff;
        }
        
        .menu-A>li:hover>.sub-menu>li {
            height: 30px;
        }
        
        .menu-B>li {
            float: left;
            width: 80px;
            height: 30px;
            background-color: #fff;
            overflow: hidden;
        }
        
        .menu-B>li .show {
            width: 80px;
            height: 30px;
            background-color: blue;
            color: #fff;
            text-align: center;
            line-height: 30px;
            transition: margin 0.5s;
        }
        
        .menu-B>li .hide {
            width: 80px;
            height: 30px;
            background-color: pink;
            color: #fff;
            text-align: center;
            line-height: 30px;
        }
        
        .menu-B>li:hover>.show {
            margin-top: -30px;
        }
        
        .menu-C {
            clear: both;
            position: fixed;
            right: 100px;
            bottom: 100px;
        }
        
        .menu-C>li {
            width: 50px;
            height: 50px;
            border: 1px solid red;
            overflow: hidden;
            position: relative;
        }
        
        .menu-C>li>.show {
            width: 50px;
            height: 50px;
            background-color: blue;
            color: #fff;
            text-align: center;
            line-height: 50px;
        }
        
        .menu-C>li>.hide {
            width: 50px;
            height: 50px;
            background-color: green;
            color: #fff;
            text-align: center;
            line-height: 50px;
            position: absolute;
            top: 0px;
            left: 0px;
            transform: rotate(45deg);
            transform-origin: -50px 50px;
            transition: transform 0.5s;
        }
        
        .menu-C>li:hover>.hide {
            transform: rotate(0deg);
        }
    </style>
</head>

<body>
    <!-- 下拉菜单 -->
    <h1>下拉菜单</h1>
    <div class="box">
        <ul class="menu-A">
            <li>
                书籍列表
                <ul class="sub-menu">
                    <li>隐藏菜单</li>
                    <li>隐藏菜单</li>
                    <li>隐藏菜单</li>
                </ul>

            </li>
            <li>
                书籍列表
                <ul class="sub-menu">
                    <li>隐藏菜单</li>
                    <li>隐藏菜单</li>
                    <li>隐藏菜单</li>
                </ul>

            </li>
            <li>
                书籍列表
                <ul class="sub-menu">
                    <li>隐藏菜单</li>
                    <li>隐藏菜单</li>
                    <li>隐藏菜单</li>
                </ul>

            </li>
        </ul>
    </div>

    <!-- 滚动菜单 -->
    <h1 style="clear: both;margin-top: 100px;margin-bottom: 50px;">滚动菜单</h1>
    <div class="box">
        <ul class="menu-B">
            <li>
                <p class="show">首页A</p>
                <p class="hide">首页B</p>
            </li>
            <li>
                <p class="show">视频A</p>
                <p class="hide">视频B</p>
            </li>
            <li>
                <p class="show">博客A</p>
                <p class="hide">博客B</p>
            </li>
        </ul>
    </div>

    <!-- 旋转菜单 -->
    <h1 style="clear: both;margin-top: 100px;margin-bottom: 50px;">旋转菜单</h1>
    <div class="box">
        <ul class="menu-C">
            <li>
                <p class="show">首页A</p>
                <p class="hide">首页B</p>
            </li>
            <li>
                <p class="show">视频A</p>
                <p class="hide">视频B</p>
            </li>
            <li>
                <p class="show">博客A</p>
                <p class="hide">博客B</p>
            </li>
        </ul>
    </div>

</body>

</html>